package com.vtquang.mymaps;

import java.util.Calendar;
import java.util.GregorianCalendar;

public class DayOfWeek {
	public static String DayWeek[] = {"", "Sunday", "Monday", "Tuesday",
			"Wednesday", "Thrusday", "Friday", "Saturday" }; 
	/*
	 * Tra ve thu trong tuan : Monday, ....
	 */
	public static String get(String day) {
		Calendar cal = new GregorianCalendar();
		
		String s[] = day.split("-");
		int d = Integer.valueOf(s[2]);
		int m = Integer.valueOf(s[1]);
		int y = Integer.valueOf(s[0]);
		cal.set(y, m - 1, d);
		int DAY_OF_WEEK = cal.get(Calendar.DAY_OF_WEEK);

		return DayWeek[DAY_OF_WEEK];
	}
}